package com.why.zing.alipay.result;

import com.alipay.api.response.AlipayTradeRefundResponse;
import com.why.zing.alipay.constant.TradeStatus;
import lombok.Data;


/**
 * 面对面订单退款返回体
 *
 * @author 睁眼看世界
 * @date 2020年1月10日
 */
@Data
public class AlipayF2FRefundResult implements Result {
    private TradeStatus tradeStatus;
    private AlipayTradeRefundResponse response;

    public AlipayF2FRefundResult(AlipayTradeRefundResponse response) {
        this.response = response;
    }

    @Override
    public boolean isTradeSuccess() {
        return response != null &&
                TradeStatus.SUCCESS.equals(tradeStatus);
    }
}
